From: Giovanni Campagna Date: Sat, 5 Feb 2011 18:42:50 +0000 (+0100) Subject: VolumeStatus: change the definition of high/medium/low X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~9113 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ad27b9eda55e153931db08e4456b8592344eff57;p=gnome-shell.git VolumeStatus: change the definition of high/medium/low Do it the same way as gnome-settings-daemon, so that OSD does not look "out-of-sync" with the status icon. https://bugzilla.gnome.org/show_bug.cgi?id=641538 --- diff --git a/js/ui/status/volume.js b/js/ui/status/volume.js index 9211968f9..f34760748 100644 --- a/js/ui/status/volume.js +++ b/js/ui/status/volume.js @@ -164,10 +164,10 @@ Indicator.prototype = { if (volume <= 0) { return 'audio-volume-muted'; } else { - let v = volume / VOLUME_MAX; - if (v < 0.33) + let n = Math.floor(3 * volume / VOLUME_MAX) + 1; + if (n < 2) return 'audio-volume-low'; - if (v > 0.8) + if (n >= 3) return 'audio-volume-high'; return 'audio-volume-medium'; }